import Login from './views/Login.vue'
import NotFound from './views/404.vue'
import Home from './views/Home.vue'
import Main from './views/Main.vue'
import Table from './views/nav1/Table.vue'
import Form from './views/nav1/Form.vue'
import user from './views/nav1/user.vue'
import Department  from "./views/org/Department";
import Employee from "./views/org/Employee";
import Permission from "./views/auth/Permission";
import Role from "./views/auth/Role";
import Menu from "./views/auth/Menu";
import Personal from "./views/personal/Personal";
import NotAuth from "./views/403"
import Config from "./views/sys/Config"
import Dictionary from "./views/sys/Dictionary";
import DictionaryItem from "./views/sys/DictionaryItem";
import Shop from "./views/org/Shop";
import ShopRegister from "./views/org/ShopRegister";
import ShopWaitAudit from "./views/org/ShopWaitAudit";
import carType from "./views/car/CarType";
import Car from "./views/car/Car";
import CarType from "./views/car/CarType";
import CarWaitAudit from "./views/car/CarWaitAudit";
import TenantType from "./views/sys/TenantType";
import Tenant from "./views/sys/Tenant";
import TenantRegister from "./views/sys/TenantRegister";

let routes = [
    {
        path: '/login',
        component: Login,
        name: '',
        hidden: true
    },
    {
        path: '/404',
        component: NotFound,
        name: '',
        hidden: true
    },
    {
        path: '/403',
        component: NotAuth,
        name: '',
        hidden: true
    },
    {
        path: '/',
        component: Home,
        name: '权限管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/permission', component: Permission, name: '权限管理' },
            { path: '/role', component: Role, name: '角色管理' },
            { path: '/menu', component: Menu, name: '菜单管理' },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '系统管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/config', component: Config, name: '系统设置'},
            { path: '/dictionary', component: Dictionary, name: '字典设置'},
            { path: '/dictionaryItem', component: DictionaryItem, name: '字典详情'},
            { path: '/tenantType', component: TenantType, name: '租户类型'},
            { path: '/tenant', component: Tenant, name: '租户'},
            { path: '/tenantRegister', component: TenantRegister, name: '租户入驻'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '汽车管理',
        iconCls: 'el-icon-message',//图标样式class
        children: [
            { path: '/carType', component: CarType, name: '汽车类型'},
            { path: '/car', component: Car, name: '汽车类型'},
            { path: '/carWaitAudit', component: CarWaitAudit, name: '商品审核'}
        ]
    },
    {
        path: '/',
        component: Home,
        name: '人力管理',
        iconCls: 'fa fa-id-card-o',
        children: [
            { path: '/department', component: Department, name: '部门管理' },
            { path: '/employee', component: Employee, name: '员工管理' },
            { path: '/shop', component: Shop, name: '店铺管理' },
            { path: '/shopWaitAudit', component: ShopWaitAudit, name: '手动审核' },
            {
                path:'/personal:id',
                name: 'personal',
                component: Personal,
                hidden: true,
            },
        ]
    },
    {
        path: '/',
        component: Home,
        name: '',
        iconCls: 'fa fa-address-card',
        leaf: true,//只有一个节点
        children: [

        ]
    },
    {
        path: '/shopRegister',
        component: ShopRegister,
        name: '店铺注册'},
    {
        path: '/',
        component: Home,
        name: 'Charts',
        iconCls: 'fa fa-bar-chart',
        children: [

        ]
    },
    {
        path: '*',
        hidden: true,
        redirect: { path: '/404' }
    }
];

export default routes;